package cn.hhz._07springaop.aop;

import org.springframework.stereotype.Component;

@Component
public class CalculatorImpl implements Calculator{
    @Override
    public int add(int x, int y) {
        System.out.println(x+y);
        return x+y;
    }

    @Override
    public int sub(int x, int y) {
        System.out.println(x-y);
        return x-y;
    }

    @Override
    public int mul(int x, int y) {
        System.out.println(x*y);
        return x*y;
    }

    @Override
    public int div(int x, int y) {
        System.out.println(x/y);
        return x/y;
    }
}
